<template>
  <el-dialog v-model="visible" :close-on-click-modal="false" title="套餐详情" draggable>
    <el-row :gutter="20" v-if="orderSnList.length">
      <el-col
        :span="6"
        style="
          display: flex;
          justify-content: center;
          align-items: center;
          color: #666;
          height: 50px;
        "
        v-for="item in orderSnList"
        :key="item.comboName"
        >{{ `${item.comboName}*${item.comboNum}` }}</el-col
      >
    </el-row>
    <div v-else style="color: #909399; text-align: center; height: 50px; font-size: 14px"
      >暂无数据</div
    >
  </el-dialog>
</template>
<script setup>
import { postPackageDataSummaryApi } from '@/api/order'

const visible = ref(false)
const orderSnList = ref([])
/**初始化 */
function init(orderSn) {
  visible.value = true
  postPackageDataSummaryApi({ orderSn }).then((res) => {
    console.log(res)
    orderSnList.value = res.data
  })
}

defineExpose({
  init
})
</script>
<style lang="scss" scoped></style>
